package com.woniuxy.profile.mapper;

import com.woniuxy.commons.dto.IntegralDto;
import com.woniuxy.commons.entity.Integral;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author: dengzj
 * @Description:积分
 * @Date: Created in 15:57 2020/7/29
 */
@Mapper
@Repository
public interface IntegralMapper {
    /*
    *@Author: dengzj
    *@Description: 获取当前用户积分明细
    *@Date: 11:20 2020/7/30
    */
    //List<Integral> findIntegralByUid(@Param("uid") int uid,@Param("index") int index,@Param("pageSize") int pageSize);
    List<Integral> findIntegralByUid(IntegralDto integralDto);
    /*
    *@Author: dengzj
    *@Description: 总积分明细条数
    *@Date: 15:05 2020/8/1
    */
    int countOfIntegral(int uid);
    /*
    *@Author: dengzj
    *@Description: 总积分数
    *@Date: 15:12 2020/8/1
    */
    int totalIntegral(int uid);
    /*
    *@Author: dengzj
    *@Description: 积分排行
    *@Date: 15:12 2020/8/1
    */
    List<Integral> rankingIntegral(IntegralDto integralDto);
    /*
    *@Author: dengzj
    *@Description: 按id分，积分总条数
    *@Date: 15:33 2020/8/1
    */
    int countOfIntegral();
}
